package com.study.spmongodb.wwj.thread2.char11;

/**
 * @author MI
 * @version 1.0
 * @date 2020/12/8 21:05
 */
public class ExecutionTask implements Runnable {

    private QueryFromDBAction queryAction = new QueryFromDBAction();

    private QueryFromHttpAction httpAction = new QueryFromHttpAction();

    @Override
    public void run() {
        final Context context = ActionContext.getActionContext().getContext();

        queryAction.execute();
        System.out.println("the name query successful");
        httpAction.execute();
        System.out.println("the cardId query successful");
        System.out.println("name is :" + context.getName() + " card id is:" + context.getCardId());
    }
}
